
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.CalendarWorktype;
import com.cmc.dao.CalendarWorktypeDao;
import com.cmc.service.CalendarWorktypeManager;

public class CalendarWorktypeManagerImpl extends BaseManager implements CalendarWorktypeManager {
    private CalendarWorktypeDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setCalendarWorktypeDao(CalendarWorktypeDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.CalendarWorktypeManager#getCalendarWorktypes(com.cmc.model.CalendarWorktype)
     */
    public List getCalendarWorktypes(final CalendarWorktype calendarWorktype) {
        return dao.getCalendarWorktypes(calendarWorktype);
    }

    /**
     * @see com.cmc.service.CalendarWorktypeManager#getCalendarWorktype(String id)
     */
    public CalendarWorktype getCalendarWorktype(final String id) {
        return dao.getCalendarWorktype(new Long(id));
    }

    /**
     * @see com.cmc.service.CalendarWorktypeManager#saveCalendarWorktype(CalendarWorktype calendarWorktype)
     */
    public void saveCalendarWorktype(CalendarWorktype calendarWorktype) {
        dao.saveCalendarWorktype(calendarWorktype);
    }

    /**
     * @see com.cmc.service.CalendarWorktypeManager#removeCalendarWorktype(String id)
     */
    public void removeCalendarWorktype(final String id) {
        dao.removeCalendarWorktype(new Long(id));
    }
    
    public List getCalendarWorktypesByStartDateEndDate(final String startDate,final String endDate){
    	return dao.getCalendarWorktypesByStartDateEndDate(startDate, endDate);
    }
}
